Merge "Add meta=userinfo&uiprop=latestcontrib"
[lhc/web/wiklou.git] / includes / libs / mime / XmlTypeCheck.php
index 9cfaf67..746f3f5 100644 (file)
@@ -364,6 +364,7 @@ class XmlTypeCheck {
                        $this->filterMatchType = $callbackReturn;
                }
        }
+
        /**
         * Handle coming across a <!DOCTYPE declaration.
         *
@@ -405,10 +406,10 @@ class XmlTypeCheck {
                        $callbackReturn = false;
                }
 
-               if ( $checkIfSafe && isset( $parsedDTD['internal'] ) ) {
-                       if ( !$this->checkDTDIsSafe( $parsedDTD['internal'] ) ) {
-                               $this->wellFormed = false;
-                       }
+               if ( $checkIfSafe && isset( $parsedDTD['internal'] ) &&
+                       !$this->checkDTDIsSafe( $parsedDTD['internal'] )
+               ) {
+                       $this->wellFormed = false;
                }
        }
 
@@ -418,7 +419,7 @@ class XmlTypeCheck {
         * We whitelist an extremely restricted subset of DTD features.
         *
         * Safe is defined as:
-        *  * Only contains entity defintions (e.g. No <!ATLIST )
+        *  * Only contains entity definitions (e.g. No <!ATLIST )
         *  * Entity definitions are not "system" entities
         *  * Entity definitions are not "parameter" (i.e. %) entities
         *  * Entity definitions do not reference other entites except &amp;